import request from '@/utils/request'

// 查询维保周期列表
export function listCycle(query) {
  return request({
    url: '/module/maintenance/cycle/list',
    method: 'get',
    params: query
  })
}

// 查询维保周期详细
export function getCycle(id) {
  return request({
    url: '/module/maintenance/cycle/' + id,
    method: 'get'
  })
}

// 新增维保周期
export function addCycle(data) {
  return request({
    url: '/module/maintenance/cycle',
    method: 'post',
    data
  })
}

// 修改维保周期
export function updateCycle(data) {
  return request({
    url: '/module/maintenance/cycle',
    method: 'put',
    data
  })
}

// 删除维保周期
export function delCycle(id) {
  return request({
    url: '/module/maintenance/cycle/' + id,
    method: 'delete'
  })
}

// 导出维保周期
export function exportCycle(query) {
  return request({
    url: '/module/maintenance/cycle/export',
    method: 'get',
    params: query
  })
}
